package com.javaee.dao;

import com.javaee.entity.Activity;
import com.javaee.entity.TeachingClass;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

public interface TeachingClassDao {

    @Insert("insert into t_manager_class (id, name, created_time, class_desc, activity_id) values (#{id},#{name},#{created_time},#{class_desc},#{activity_id})")
    public int create(TeachingClass teachingclass);

    @Insert("insert into t_teaching_student_in_class (class_id, student_id) values (#{class_id},#{student_id})")
    public int related(TeachingClass teachingclass);

    @Update("update t_manager_class set teacher_id = #{teacher_id} where id = #{id}")
    public int allocate(TeachingClass teachingclass);
}
